package cn.tedu.anjiadb.mapper;

import cn.tedu.anjiadb.pojo.entity.Admin;
import cn.tedu.anjiadb.pojo.vo.AdminListItemVO;
import cn.tedu.anjiadb.pojo.vo.AdminStandardVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdminMapper {
    int insert(Admin admin);

    int insertBatch(List<Admin> adminList);

    int deleteById(Long id);

    int deleteByIds(Long[] idList);

    int update(Admin admin);

    int count();

    int countByName(String name);

    int countByNameAndNotId(@Param("id") Long id, @Param("name") String name);

    AdminStandardVO getStandardById(Long id);

    List<AdminListItemVO> list();
}
